package com.srwl.mytx.widget;

import android.content.Context;
import android.os.Bundle;

import com.srwl.mytx.R;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by dahai2070 on 2016/11/13 0013.
 */
public class OrderDialog extends android.app.AlertDialog {


    private ClickListener clickListener;
    Context context;



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.dialog_layout_order_for_goods_list);
        ButterKnife.bind(this);


    }

    public OrderDialog(Context context) {
        super(context, R.style.date_choose_dialog);
        this.context = context;
    }


    @OnClick(R.id.tv_nearest)
    void nearest(){
        clickListener.nearClick();
    }
    @OnClick(R.id.tv_min_price)
    void minPrice(){
        clickListener.minPriceClick();
    }
    @OnClick(R.id.tv_max_price)
    void maxPrice(){
        clickListener.maxPriceClick();
    }
    public void setOnItemClickListener(ClickListener clickListener) {
        this.clickListener= clickListener;
    }


    public interface ClickListener {
        void nearClick();
        void minPriceClick();
        void maxPriceClick();
    }




}
